<?php

/**
 * @author liempv
 * @copyright 2012
 */

defined('DSVH') or die('Restricted access');

//ham lay du lieu tu can bo
function getCauhinh($id)
    {
    $pro = mysql_query("select * from cau_hinh where id = '".(int)$id."'", dbconnect());
    return mysql_fetch_array($pro);
    }
//cap nhat trong thu muc sua
function editCauhinh($id, $local)
{
    $sql = "update cau_hinh set ten_doanh_nghiep ='".$local['ten_doanh_nghiep']."',
    ten_viet_tat = '".$local['ten_viet_tat']."',
    dia_chi = '".$local['dia_chi']."',
    keyword = '".$local['keyword']."',
    description = '".$local['description']."',
    dien_thoai = '".$local['dien_thoai']."',
    fax = '".$local['fax']."',
    di_dong = '".$local['di_dong']."',
    fax = '".$local['fax']."',
    email = '".$local['email']."',
    ten1 = '".$local['ten1']."',
    dt1 = '".$local['dt1']."',
    yahoo1 = '".$local['yahoo1']."',
    ten2 = '".$local['ten2']."',
    dt2 = '".$local['dt2']."',
    yahoo2 = '".$local['yahoo2']."'
    where id = '".(int)$id."'";
   
    mysql_query($sql, dbconnect());
}   



?>